<?php

class BlogAction extends BaseAction {

	public function _empty() {
		$this->display("Index:blog");
	}
	
	public function index() {
		$blogs = D("blog")->select();
		$this->assign('blogs', $blogs);
		$this->display("Index:blog_list");
	}
	
	public function getBlog() {
		$id = $_GET['id'];
		$blog = D("blog")->where('id='. $id)->find();
		$this->assign('blog', $blog);
		$this->display("Index:blog");
	}
}
?>